package dm_schema

import (
	"server/global"
)

type DmSchema struct {
	global.BaseModel
	Type             string `json:"type" form:"type" gorm:"column:type;comment:接口数据源配置;size:100;"`
	Ip               string `json:"ip" form:"ip" gorm:"column:ip;comment:数据库ip;size:100;"`
	Port             string `json:"port" form:"port" gorm:"column:port;comment:数据库端口;size:50;"`
	User             string `json:"user" form:"user" gorm:"column:user;comment:数据库用户名;size:50;"`
	Password         string `json:"password" form:"password" gorm:"column:password;comment:数据库密码;size:100;"`
	Schema           string `json:"schema" form:"schema" gorm:"column:schema;comment:数据库模式;size:50;"`
	Parm             string `json:"parm" form:"parm" gorm:"column:parm;comment:url参数;size:100;"`
	IpPortUserSchema string `json:"ipPortUserSchema" form:"ipPortUserSchema" gorm:"column:ipPortUserSchema;comment:IpPortUserSchema;size:200;"`
	State            *int   `json:"state" form:"state" gorm:"column:state;comment:数据库状态;"`
	Topic            string `json:"topic" form:"topic" gorm:"column:topic;comment:数据库主题;size:50;"`
	Version          string `json:"version" form:"version" gorm:"column:version;comment:数据库版本;size:100;"`
	Os               string `json:"os" form:"os" gorm:"column:os;comment:操作系统;size:200;"`
	Remarks          string `json:"remarks" form:"remarks" gorm:"column:remarks;comment:备注;size:250;"`
	CreatedBy        uint   `gorm:"column:created_by;comment:创建者"`
	UpdatedBy        uint   `gorm:"column:updated_by;comment:更新者"`
	DeletedBy        uint   `gorm:"column:deleted_by;comment:删除者"`
}

func (DmSchema) TableName() string {
	return "dm_schema"
}
